import BaseLayout from '@/layouts/BaseLayout.vue';
import LoginView from '@/views/LoginView.vue';
import NotFound from '@/views/NotFound.vue';


export default [
    {
        path: '/login',
        name: 'login',
        component: LoginView,
        meta: { title: '登录页面',requireAuth: false  }
    },
    {
        path: '/',
        name:'home',
        // redirect: '/workspace',
        component: BaseLayout
    },
    {
        path: '/workspace',
        redirect: '/workspace/workbench',
        component: BaseLayout,
        meta: { title: '工作空间' },
        children: [
            {
                path: '/workspace/workbench',
                name: 'workbench',
                component: () => import('@/views/workspace/WorkBench.vue'),
                meta: { title: '工作台', requireAuth: true, affix: true, closable: false },
            },
            {
                path: '/workspace/console',
                name: 'console',
                component: () => import('@/views/workspace/ConsoleView.vue'),
                meta: { title: '工作台', requireAuth: true, affix: true, closable: false },
            }
        ]
    },
    {
        path: '/:pathMatch(.*)*',
        name: 'NotFound',
        component: NotFound,
        meta: { requireAuth: false }
    }
];